Advertisement
linuxct

Pixel Launcher P-4275643 from Pixel 2 SMALI MODIFICATIONS

Oct 14th, 2017
6,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 13.22 KB | None | 0 0
  1. From f7e1329871001d88ffd88a26ac9627a1ec94965c Mon Sep 17 00:00:00 2001
  2. From: LinuxCT <linuxct@github.com>
  3. Date: Sat, 14 Oct 2017 22:38:15 +0200
  4. Subject: [PATCH] Pixel Launcher P-4275643 from Google Pixel 2
  5.  
  6. ---
  7. AndroidManifest.xml                                        | 6 +++---
  8.  apktool.yml                                                | 6 +++---
  9.  res/layout-land/launcher.xml                               | 2 +-
  10.  res/layout-port/launcher.xml                               | 2 +-
  11.  res/layout-sw720dp-v13/launcher.xml                        | 2 +-
  12.  res/layout/qsb_hotseat_content.xml                         | 6 +++---
  13.  res/values/colors.xml                                      | 1 +
  14.  res/values/styles.xml                                      | 5 +++--
  15.  res/xml/launcher_preferences.xml                           | 7 ++++---
  16.  smali/com/android/launcher3/LauncherAppState.smali         | 4 ++--
  17.  smali/com/google/android/gms/common/internal/zzu$zza.smali | 2 +-
  18.  11 files changed, 23 insertions(+), 20 deletions(-)
  19.  
  20. diff --git a/AndroidManifest.xml b/AndroidManifest.xml
  21. index a4f9fc4..f464599 100644
  22. --- a/AndroidManifest.xml
  23. +++ b/AndroidManifest.xml
  24. @@ -28,7 +28,7 @@
  25.                  <data android:scheme="package"/>
  26.              </intent-filter>
  27.          </receiver>
  28. -        <receiver android:enabled="@bool/notification_badging_enabled" android:name="com.google.android.apps.nexuslauncher.reflection.NewAppInstallReceiver$V26">
  29. +        <receiver android:enabled="true" android:name="com.google.android.apps.nexuslauncher.reflection.NewAppInstallReceiver$V26">
  30.              <intent-filter>
  31.                  <action android:name="android.content.pm.action.SESSION_COMMITTED"/>
  32.              </intent-filter>
  33. @@ -111,7 +111,7 @@
  34.      <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  35.      <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
  36.      <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
  37. -    <uses-feature android:name="com.google.android.feature.PIXEL_EXPERIENCE" android:required="true"/>
  38. +    <uses-feature android:name="com.google.android.feature.PIXEL_EXPERIENCE" android:required="false"/>
  39.      <permission android:description="@string/permdesc_install_shortcut" android:label="@string/permlab_install_shortcut" android:name="com.android.launcher.permission.INSTALL_SHORTCUT" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" android:protectionLevel="dangerous"/>
  40.      <uses-permission android:name="android.permission.CALL_PHONE"/>
  41.      <uses-permission android:name="android.permission.SET_WALLPAPER"/>
  42. @@ -121,4 +121,4 @@
  43.      <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  44.      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  45.      <uses-permission android:name="android.permission.INTERNET"/>
  46. -</manifest>
  47. \ No newline at end of file
  48. +</manifest>
  49. diff --git a/apktool.yml b/apktool.yml
  50. index 466839e..7a4c788 100644
  51. --- a/apktool.yml
  52. +++ b/apktool.yml
  53. @@ -1,5 +1,5 @@
  54.  !!brut.androlib.meta.MetaInfo
  55. -apkFileName: pixel_P-4275643-ori.apk
  56. +apkFileName: pixel_P-4275643.apk
  57.  compressionType: false
  58.  doNotCompress:
  59.  - arsc
  60. @@ -8,7 +8,7 @@ packageInfo:
  61.    forcedPackageId: '127'
  62.    renameManifestPackage: null
  63.  sdkInfo:
  64. -  minSdkVersion: '21'
  65. +  minSdkVersion: '20'
  66.    targetSdkVersion: '26'
  67.  sharedLibrary: false
  68.  unknownFiles:
  69. @@ -21,4 +21,4 @@ usesFramework:
  70.  version: 2.3.0
  71.  versionInfo:
  72.    versionCode: '301'
  73. -  versionName: P-4275643
  74. +  versionName: P-4275643-mod
  75. diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
  76. index c0b148d..0455b42 100644
  77. --- a/res/layout-land/launcher.xml
  78. +++ b/res/layout-land/launcher.xml
  79. @@ -11,4 +11,4 @@
  80.          <include android:id="@id/apps_view" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/all_apps" />
  81.          <com.android.launcher3.pageindicators.PageIndicatorCaretLandscape android:theme="@style/HomeScreenElementTheme" android:layout_gravity="bottom|center|left" android:id="@id/page_indicator" android:layout_width="@dimen/dynamic_grid_min_page_indicator_size" android:layout_height="@dimen/dynamic_grid_min_page_indicator_size" />
  82.      </com.android.launcher3.dragndrop.DragLayer>
  83. -</com.android.launcher3.LauncherRootView>
  84. \ No newline at end of file
  85. +</com.android.launcher3.LauncherRootView>
  86. diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
  87. index 9adf81e..50c6486 100644
  88. --- a/res/layout-port/launcher.xml
  89. +++ b/res/layout-port/launcher.xml
  90. @@ -11,4 +11,4 @@
  91.          <include android:id="@id/widgets_view" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/widgets_view" />
  92.          <include android:id="@id/apps_view" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/all_apps" />
  93.      </com.android.launcher3.dragndrop.DragLayer>
  94. -</com.android.launcher3.LauncherRootView>
  95. \ No newline at end of file
  96. +</com.android.launcher3.LauncherRootView>
  97. diff --git a/res/layout-sw720dp-v13/launcher.xml b/res/layout-sw720dp-v13/launcher.xml
  98. index a56ea4c..1813429 100644
  99. --- a/res/layout-sw720dp-v13/launcher.xml
  100. +++ b/res/layout-sw720dp-v13/launcher.xml
  101. @@ -11,4 +11,4 @@
  102.          <include android:id="@id/widgets_view" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/widgets_view" />
  103.          <include android:id="@id/apps_view" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/all_apps" />
  104.      </com.android.launcher3.dragndrop.DragLayer>
  105. -</com.android.launcher3.LauncherRootView>
  106. \ No newline at end of file
  107. +</com.android.launcher3.LauncherRootView>
  108. diff --git a/res/layout/qsb_hotseat_content.xml b/res/layout/qsb_hotseat_content.xml
  109. index 1c9c176..f4e6943 100644
  110. --- a/res/layout/qsb_hotseat_content.xml
  111. +++ b/res/layout/qsb_hotseat_content.xml
  112. @@ -1,6 +1,6 @@
  113.  <?xml version="1.0" encoding="utf-8"?>
  114.  <merge
  115.    xmlns:android="http://schemas.android.com/apk/res/android">
  116. -    <ImageView android:layout_gravity="start|center" android:id="@id/g_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="?gIcon" />
  117. -    <ImageView android:layout_gravity="end|center" android:id="@id/mic_icon" android:background="?android:selectableItemBackgroundBorderless" android:clickable="true" android:layout_width="48.0dip" android:layout_height="fill_parent" android:layout_marginTop="-6.0dip" android:layout_marginBottom="-6.0dip" android:src="?micIcon" android:scaleType="center" android:contentDescription="@string/label_voice_search" />
  118. -</merge>
  119. \ No newline at end of file
  120. +    <ImageView android:layout_gravity="start|center" android:id="@id/g_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_super_g_color" />
  121. +    <ImageView android:layout_gravity="end|center" android:id="@id/mic_icon" android:background="?android:selectableItemBackgroundBorderless" android:clickable="true" android:layout_width="48.0dip" android:layout_height="fill_parent" android:layout_marginTop="-6.0dip" android:layout_marginBottom="-6.0dip" android:src="@drawable/ic_mic_color" android:scaleType="center" android:contentDescription="@string/label_voice_search" />
  122. +</merge>
  123. diff --git a/res/values/colors.xml b/res/values/colors.xml
  124. index 5c83b57..dbfd338 100644
  125. --- a/res/values/colors.xml
  126. +++ b/res/values/colors.xml
  127. @@ -39,4 +39,5 @@
  128.      <color name="qsb_background">#ffffffff</color>
  129.      <color name="qsb_icon_shadow_color">#20000000</color>
  130.      <color name="qsb_dark_icon_tint">#ff757575</color>
  131. +    <color name="quantum_panel_text_color">#ff666666</color>
  132.  </resources>
  133. diff --git a/res/values/styles.xml b/res/values/styles.xml
  134. index 8a22e1c..2f41fcd 100644
  135. --- a/res/values/styles.xml
  136. +++ b/res/values/styles.xml
  137. @@ -7,6 +7,7 @@
  138.          <item name="android:colorBackgroundCacheHint">@null</item>
  139.          <item name="android:keyboardLayout">@layout/search_container_all_apps</item>
  140.          <item name="android:colorEdgeEffect">#ff757575</item>
  141. +        <item name="android:colorPrimary">#fff5f5f5</item>
  142.      </style>
  143.      <style name="BaseLauncherThemeWithCustomAttrs" parent="@style/BaseLauncherTheme">
  144.          <item name="allAppsScrimColor">#ddffffff</item>
  145. @@ -70,8 +71,8 @@
  146.          <item name="android:elevation">3.0dip</item>
  147.      </style>
  148.      <style name="AllAppsNavBarProtection">
  149. -        <item name="android:background">@color/default_shadow_color_no_alpha</item>
  150. -        <item name="android:alpha">?android:spotShadowAlpha</item>
  151. +        <item name="android:background">?android:colorPrimary</item>
  152. +        <item name="android:alpha">0.6</item>
  153.      </style>
  154.      <style name="BaseIcon">
  155.          <item name="android:textColor">?android:textColorSecondary</item>
  156. diff --git a/res/xml/launcher_preferences.xml b/res/xml/launcher_preferences.xml
  157. index 66e5f0d..a5b8c90 100644
  158. --- a/res/xml/launcher_preferences.xml
  159. +++ b/res/xml/launcher_preferences.xml
  160. @@ -1,7 +1,7 @@
  161.  <?xml version="1.0" encoding="utf-8"?>
  162.  <PreferenceScreen android:persistent="false" android:key="preference_screen"
  163.    xmlns:android="http://schemas.android.com/apk/res/android">
  164. -    <com.android.launcher3.views.ButtonPreference android:persistent="false" android:title="@string/icon_badging_title" android:key="pref_icon_badging" android:widgetLayout="@layout/notification_pref_warning">
  165. +    <com.android.launcher3.views.ButtonPreference android:persistent="true" android:title="@string/icon_badging_title" android:key="pref_icon_badging" android:widgetLayout="@layout/notification_pref_warning">
  166.          <intent android:action="android.settings.NOTIFICATION_SETTINGS">
  167.              <extra android:name=":settings:fragment_args_key" android:value="notification_badging" />
  168.          </intent>
  169. @@ -11,12 +11,13 @@
  170.      <SwitchPreference android:title="@string/title_show_google_app" android:key="pref_enable_minus_one" android:summary="@string/pref_show_google_now_summary" android:defaultValue="true" />
  171.      <SwitchPreference android:title="@string/title_app_suggestions" android:key="pref_show_predictions" android:summary="@string/summary_app_suggestions" android:defaultValue="true" />
  172.      <SwitchPreference android:title="@string/allow_rotation_title" android:key="pref_allowRotation" android:defaultValue="@bool/allow_rotation" />
  173. -    <ListPreference android:persistent="false" android:entries="@array/icon_shape_override_paths_names" android:title="@string/icon_shape_override_label" android:key="pref_override_icon_shape" android:summary="%s" android:defaultValue="" android:entryValues="@array/icon_shape_override_paths_values" />
  174. +    <ListPreference android:persistent="true" android:entries="@array/icon_shape_override_paths_names" android:title="@string/icon_shape_override_label" android:key="pref_override_icon_shape" android:summary="%s" android:defaultValue="" android:entryValues="@array/icon_shape_override_paths_values" />
  175.      <PreferenceScreen android:persistent="false" android:title="@string/about" android:key="about_screen">
  176.          <Preference android:persistent="false" android:title="@string/about_app_version" android:key="about_app_version" />
  177. +        <Preference android:persistent="false" android:title="Mod version" android:key="iamlinuxct" android:summary="5" />
  178.          <Preference android:persistent="false" android:title="@string/app_info_drop_target_label" android:key="app_info">
  179.              <intent android:action="android.settings.APPLICATION_DETAILS_SETTINGS" android:data="package:com.google.android.apps.nexuslauncher" />
  180.          </Preference>
  181.          <Preference android:persistent="false" android:title="@string/pref_open_source_licenses_title" android:key="open_source_licenses" android:fragment="com.google.android.apps.nexuslauncher.SettingsActivity$OpenSourceLicensesFragment" />
  182.      </PreferenceScreen>
  183. -</PreferenceScreen>
  184. \ No newline at end of file
  185. +</PreferenceScreen>
  186. diff --git a/smali/com/android/launcher3/LauncherAppState.smali b/smali/com/android/launcher3/LauncherAppState.smali
  187. index 41b5351..1d92ccc 100644
  188. --- a/smali/com/android/launcher3/LauncherAppState.smali
  189. +++ b/smali/com/android/launcher3/LauncherAppState.smali
  190. @@ -332,7 +332,7 @@
  191.      .catchall {:try_start_1 .. :try_end_1} :catchall_2
  192.  
  193.      .line 165
  194. -    if-eqz v1, :cond_0
  195. +    if-nez v1, :cond_0
  196.  
  197.      :try_start_2
  198.      invoke-virtual {v1}, Landroid/content/ContentProviderClient;->close()V
  199. @@ -376,7 +376,7 @@
  200.      move-object v0, v3
  201.  
  202.      :goto_2
  203. -    if-eqz v1, :cond_2
  204. +    if-nez v1, :cond_2
  205.  
  206.      :try_start_4
  207.      invoke-virtual {v1}, Landroid/content/ContentProviderClient;->close()V
  208. diff --git a/smali/com/google/android/gms/common/internal/zzu$zza.smali b/smali/com/google/android/gms/common/internal/zzu$zza.smali
  209. index caed54f..5e5d5cd 100644
  210. --- a/smali/com/google/android/gms/common/internal/zzu$zza.smali
  211. +++ b/smali/com/google/android/gms/common/internal/zzu$zza.smali
  212. @@ -11,7 +11,7 @@
  213.  
  214.      const/4 v0, 0x0
  215.  
  216. -    if-eqz p0, :cond_1
  217. +    if-nez p0, :cond_1
  218.  
  219.      const-string/jumbo v0, "com.google.android.gms.common.internal.IGmsServiceBroker"
  220.  
  221. --
  222. 2.14.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement